package basic;

import java.util.Scanner;

public class number6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数");
        int num1 = sc.nextInt();
        System.out.println("请输入第二个整数");
        int num2 = sc.nextInt();
        System.out.println(((num1 + num2 != 0) && (num1 + num2) % 6 == 0)||(num1 == 6 || num2 == 6));
    }
}
